- @no_container = true
- page_title "贡献者统计", "图表"
= render 'head'

%div{ class: container_class }
  .sub-header-block
    .tree-ref-holder
      = render 'shared/ref_switcher', destination: 'graphs'
    %ul.breadcrumb.repo-breadcrumb
      = commits_breadcrumbs

  .loading-graph
    .center
      %h3.page-title
        %i.fa.fa-spinner.fa-spin
        正在构建版本库图表。
      %p.slead 请稍候，成功后会自动刷新页面。

  .stat-graph.hide
    .header.clearfix
      %h3#date_header.page-title
      %p.light
        提交到 #{@ref}, 排除合并提交。限制为 6,000 次提交。
      %input#brush_change{:type => "hidden"}
    .graphs.row
      #contributors-master
      #contributors.clearfix
        %ol.contributors-list.clearfix



:javascript
  $.ajax({
    type: "GET",
    url: location.href,
    dataType: "json",
    success: function (data) {
      var graph = new ContributorsStatGraph();
      graph.init(data);

      $("#brush_change").change(function(){
        graph.change_date_header();
        graph.redraw_authors();
      });

      $(".stat-graph").fadeIn();
      $(".loading-graph").hide();
    }
  });
